import React from "react";
import type { PaginationProps } from 'antd';
import { Pagination } from 'antd';

import styles from "./index.module.scss"

type propsType = {
    count: number,
    onChange: PaginationProps['onChange']
}

const PaginationComponent: React.FC<propsType> = (e) => {

    return (
        <div className={styles.Pagination}>
            <Pagination
                showTotal={(total) => `总共${total}条`}
                showQuickJumper
                defaultPageSize={10}
                showSizeChanger
                defaultCurrent={1}
                total={e.count}
                onChange={e.onChange}
            />
        </div>
    )
}

export default PaginationComponent;